<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>Facelet Title</title>
        <link type="text/css" rel="stylesheet" href="./resources/default/css/template.css"/>
    </h:head>
    <h:body>
        <h:form>
            <p:tabView style="font-size: 10px;">
                <p:tab title="Hat Sorgulama" >
                    <h:panelGrid id="routePanelGrid" columns="1" cellpadding="5" style="text-align: right;  " >
                        <p:autoComplete  id="autoRoute"  size="40" value="#{RouteBean.routeDescription}" completeMethod="#{RouteBean.completeVehicle}"
                                         var="route" itemLabel="#{route.findCompleteLabel()}" itemValue="#{route.descriptionId}"
                                         converter="RouteStationConverter" forceSelection="true"  >
                            <p:column style="width: 250px; padding: 2px 5px; font-size: 11px;">
                                <h:outputText value="#{route.descriptionVehicleName}  #{route.descriptionStartStation.stationName} - #{route.descriptionEndStation.stationName}"/>

                            </p:column>

                        </p:autoComplete>
                        <p:commandButton  value="Sorgula" action="#{RouteBean.search()}"/>

                    </h:panelGrid>
                </p:tab>
                <p:tab title="Nasıl Giderim">
                    <h:panelGrid columns="1" cellpadding="5" style="text-align: right; " >
                        <p:autoComplete  id="startStation"  size="40" value="#{StationBean.startStation}" completeMethod="#{StationBean.completeStartStationByName}"
                                         var="station" itemLabel="#{station.stationName}" itemValue="#{station.stationId}"
                                         converter="StationConverter" forceSelection="true"  >

                        </p:autoComplete>
                        <p:autoComplete  id="endstation"  size="40" value="#{StationBean.endStation}" completeMethod="#{StationBean.completeEndStationByName}"
                                         var="station" itemLabel="#{station.stationName}" itemValue="#{station.stationId}"
                                         converter="StationConverter" forceSelection="true"  >

                        </p:autoComplete>
                        <p:commandButton value="Sorgula"/>

                    </h:panelGrid>
                </p:tab>
            </p:tabView>


        </h:form>

    </h:body>
</html>

